AppCompatSpinner
(SESL variant) A Spinner which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in androidx.core.view.ViewCompat.
- Allows setting of the background tint using buttonTint and buttonTintMode.
- Setting the popup theme using popupTheme.
This will automatically be used when you use Spinner in your layouts. You should only need to manually use this class when writing custom views.
Constructors
Link copied to clipboard
Construct a new spinner with the given context's theme.
Construct a new spinner with the given context's theme and the supplied mode of displaying choices.
Construct a new spinner with the given context's theme and the supplied attribute set.
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int)
Construct a new spinner with the given context's theme, the supplied attribute set, and default style attribute.
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int, mode: Int)
Construct a new spinner with the given context's theme, the supplied attribute set, and default style.
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int, mode: Int, popupTheme: Resources.Theme)
Constructs a new spinner with the given context's theme, the supplied attribute set, default styles, popup mode (one of MODE_DIALOG or MODE_DROPDOWN), and the context against which the popup should be inflated.
Functions
Link copied to clipboard
Get the configured horizontal offset in pixels for the spinner's popup window of choices.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This should be accessed via getBackgroundTintList
Link copied to clipboard
This should be accessed via getBackgroundTintMode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
This should be accessed via setBackgroundTintList
Link copied to clipboard
This should be accessed via setBackgroundTintMode